package com.astar.controller;


import com.astar.pojo.Menu;
import com.astar.service.IMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author weishen
 * @since 2021-06-21
 */
@RestController
@RequestMapping("/menu")
@Api(tags = "MenuController")
public class MenuController {
    @Resource
    private IMenuService menuService;

    @ApiOperation("根据用户id查菜单")
    @GetMapping("/all")
    public List<Menu> findMenusByAdminId(){
        return menuService.findMenusByAdminId();
    }
}
